]> dgit.raspbian.org Git - gnome-shell.git/commit
st: Fix closure annotations
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2024 13:46:31 +0000 (14:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 23 Nov 2024 12:16:49 +0000 (13:16 +0100)
commit8991e1e984c172ea43d2fc5794de0aa5b36d0f7f
tree730595b993e5649b8d32e9479db7a47f9d4432ce
parentb9846fec1e1c6ce1bdf4a4e9e398fccd7de0ccd2
st: Fix closure annotations

Quoting Ebassi https://www.bassi.io/articles/2023/02/20/bindable-api-2023/:

    Whenever you’re describing a function that takes a callback, you
    should always annotate the callback argument with the argument that
    contains the user data using the (closure argument) annotation

    You should not annotate the data argument with a unary (closure).

    The unary (closure) is meant to be used when annotating the callback
    type

Recently gobject-introspection became a bit more strict with this and
that generated some warnings:

    Warning: St: invalid "closure" annotation: only valid on callback
    parameters

This commit fix all the closure annotations.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3535>
(cherry picked from commit 411fe9c42f1e4617ddbdd5207998b67abe036806)
src/st/st-icon-theme.c